/* Layout */
import Layout from '@/layout'

export default [

  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },

  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },

  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [{
      path: 'dashboard',
      name: 'Dashboard',
      component: () => import('@/views/dashboard/index'),
      meta: { title: '首页', icon: 'el-icon-s-home' }
    }
    ]
  },

  {
    path: '/product',
    component: Layout,
    redirect: '/trademark',
    meta: { title: '商品管理', icon: 'el-icon-shopping-bag-1' },
    children: [
      {
        path: 'category',
        name: 'Category',
        component: () => import('@/views/product/category'),
        meta: { title: '分类管理' }
      },
      {
        path: 'trademark',
        name: 'Trademark',
        component: () => import('@/views/product/trademark'),
        meta: { title: '品牌管理' }
      },
      {
        path: 'attr',
        name: 'Attr',
        component: () => import('@/views/product/attr'),
        meta: { title: '属性管理' }
      },
      {
        path: 'spu',
        name: 'Spu',
        component: () => import('@/views/product/spu'),
        meta: { title: 'SPU管理' }
      },
      {
        path: 'sku',
        name: 'Sku',
        component: () => import('@/views/product/sku'),
        meta: { title: 'SKU管理' }
      }
    ]
  },

  // 404 page must be placed at the end !!!
  { path: '*', redirect: '/404', hidden: true }
]

